﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CustomMVCCore
{
    public sealed class WebVar<T>
    {
        private static List<T> _list = null;
        private static readonly object syn = new object();

        private WebVar() { }

        public static List<T> GetList
        {
            get
            {
                lock (syn)
                {
                    if (_list == null)
                    {
                        _list = new List<T>();
                    }
                    return _list;
                }
            }
        }
    }
}
